package com.net.shard;

/**

 */
public class ShardContextHolder {
    private static final ThreadLocal<ShardContext> holder = new ThreadLocal<>();

    public static void putShardContext(ShardContext context) {
        holder.set(context);
    }

    public static ShardContext getShardContext() {
        return holder.get();
    }

    public static void removeShardContext(){
        holder.remove();
    }
}
